package psrc.logic.pages.fabrica;

import java.util.ArrayList;
import java.util.List;

import psrc.logic.pages.base.ControllerBase;
import psrc.logic.util.beans.FabricaBean;

public class LoadFabricaSeeController extends ControllerBase {
	
	
	private static final long serialVersionUID = 1L;

	List<FabricaBean> fabrica = new ArrayList<FabricaBean>();
	
	@Override
	public String executeController() throws Exception {
		FabricaModel model = new FabricaModel();
		try{
			this.fabrica = model.getFabricasList();
			
		} catch (Exception e) {
			return "genericError";
		}
		return SUCCESS;
	}
	
	public List<FabricaBean> getFabrica() {
		return fabrica;
	}

	public void setFabrica(List<FabricaBean> fabrica) {
		this.fabrica = fabrica;
	}
}
